﻿<!--#include file="admin/Includes/constants.asp"-->
<!--#include file="admin/Includes/validate.asp"-->
<!--#include file="system/bookmark_online.asp"-->


<%
Dim ArticleID, SubCatName_hyphen, strURL, strAction
Dim aData, hasData
Dim aData2, nRows2, rCount2, hasData2
Dim aData3, nRows3, rCount3, hasData3
Dim aData4, nRows4, rCount4, hasData4
Dim aData5, nRows5, rCount5, hasData5
dim refid, txtStyle, ImageW, sAvatarO, sAvatarC
Dim firstRec, lastRec, ListPageSize, TotalRecords, TotalPages, isNext, isPre, url
Dim MainImageNo, MainTitle, MainImageW, MainIID, strArticleNewer, strArticleOlder, showmessage



Dim uTitle, kTitle, uAuthor, uBody, kBody, SubCatName, SubCatID, niqueKeywords, LayoutFormat, Brand, Season, fYear, MainCatName_hyphen, MainCatName


seo_model_img = "~/../hinh-anh-nguoi-mau"
seo_ads_img = "~/../hinh-quang-cao"
seo_mode_img = "~/../hinh-thoi-trang"

showmessage=request("msg")
refid = request("refid")
'if refid <> "" then
'	strSQL = "{CALL a_Ref_add ("&refid&")}"		
'	exec(strsql)
'end if

ArticleID=request("aid")

Dim CurPgNum
CurPgNum = request("p")
if CurPgNum = "" then 
	CurPgNum = 1
else 
	curPgNum = cint(curPgNum)
end if

strSQL = "{CALL a_detail_v2_seo ("& ArticleID & "," & CurPgNum & ")}"	
exec(strsql)

	If Not RS Is Nothing Then
	If Not RS.EOF Then
		aData = RS.getrows		
		hasData=True			
	End If
	End If	
	
	'Images Verticle and Horizontal
	Set RS=RS.NextRecordSet	
	If Not RS Is Nothing Then
	If Not RS.EOF Then		
		aData2 = RS.getrows		
		nRows2 = Ubound(aData2,2)
		hasData2=True		
	End If
	End If	
	
	Set RS=RS.NextRecordSet	
	If Not RS Is Nothing Then
	If Not RS.EOF Then		
		aData3 = RS.getrows		
		hasData3 = true
		MainImageNo = aData3(0,0)
		MainTitle = aData3(1,0)
		MainImageW = aData3(2,0)
		MainIID = aData3(3,0)
		TotalRecords = aData3(4,0)
		ListPageSize = aData3(5,0)
	End If		
	End If	

	'Newer Articles
	Set RS=RS.NextRecordSet	
	If Not RS Is Nothing Then
	If Not RS.EOF Then		
		aData4 = RS.getrows		
		nRows4 = Ubound(aData4,2)
		hasData4=True				
	End If		
	End If	
	
	'Older Articles
	Set RS=RS.NextRecordSet	
	If Not RS Is Nothing Then
	If Not RS.EOF Then		
		aData5 = RS.getrows		
		nRows5 = Ubound(aData5,2)
		hasData5=True				
	End If			
	End If		
	CloseCon

InitArticleNaming

'Cal paging	
'handle not set main image
if hasData2 then
	if MainImageNo = "" then MainImageNo = aData2(0,0)
	if MainTitle = "" then MainTitle = aData2(1,0)
	if MainImageW = "" then MainImageW = aData2(2,0)
	if MainIID = "" then MainIID = aData2(3,0)						
End if
		
if ListPageSize  = "" then ListPageSize = 18

Totalpages = totalRecords \ ListPageSize 
if TotalRecords mod ListPageSize > 0 then Totalpages = Totalpages + 1

'response.write totalRecords & "=" & totalpages & "<br>"
if curPgNum < totalPages then
	isNext = true
else
	isNext = false
end if

if curPgNum > 1 then 
	isPre = true
else
	isPre = false
end if



Dim listImage
if LayoutFormat = 2 then	'avatar
	listImage = getListImage(5)
else
	listImage = getListImage(2)
end if
Function getListImage (imagePerRows)
	Dim i, strArr
	'vertical and horizontal image
	if hasData2 then
	dim tempspe, processSize
	processSize = 2	
	tempspe = ListPageSize \ processSize
	if ListPageSize mod processSize > 0 then tempspe = tempspe + 1
	if hasData3 = false then nRows2 = nRows2 - 1
	for i = 0 to nRows2		
		strArr = strArr & aData2(0,i) &";" & aData2(1,i) &";" & aData2(2,i) &";" & aData2(3,i) & ";" & aData2(4,i) & ","
		if ((i+1) mod tempspe = 0) and  i < (nRows2 ) and ((i+1) mod imagePerRows = 0)  then strArr = strArr & "~,"
	next
	end if	
	getListImage = TrimChar(strArr, ",")
end Function

function showNumberNavigation
	Dim i, str2, aclass, tdclass
	str2 = "<table border='0' cellpadding='0' cellspacing='0'><tr>"
	for i = 1 to TotalPages
		if i = CurPgNum then 
			tdClass = "pagingSelected"	
			aclass="pagingSelected"
		else
			aclass="pagingOn"
			tdclass =""
		End if		
		'str2 = str2 & "<td width='20' class='"&tdclass&"' align='center'><a href='" & url & "&p=" & i & "' class='"&aclass&"'>"&i&"</a></td>"
		str2 = str2 & "<td width='20' class='"&tdclass&"' align='center'><a href='" & getPageDetail(i) & "' class='"&aclass&"'>"&i&"</a></td>"		
		
	next
	str2 = str2 & "</tr></table>"
	showNumberNavigation = str2
end function
function showNavigation
	dim str
	str = "<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr><td>&nbsp;<span class='paging'>Trang " & CurPgNum & "/" &  totalPages & "</span></td><td align='right'><table border='0' cellpadding='0' cellspacing='0'><tr><td><table><tr>"
'	if isPre = true then str = str & "<td><a href='" & url & "&p=" & (CurPgNum -1) & "' class='Command' ><img src='hinh-thoi-trang\ico_3arrowsL.gif' alt='Xem trang trước' height='16' align='absmiddle'>Trang trước</a></td>"
	if isPre = true then str = str & "<td><a href='" & getPageDetail(CurPgNum -1) & "' class='Command' ><img src='"& seo_mode_img &"\ico_3arrowsL.gif' alt='Xem trang trước' height='16' align='absmiddle'>Trang trước</a></td>"	
	str = str & "<td>" & showNumberNavigation & "</td>"
'	if isNext = true then str = str  & "<td><a href='"& url & "&p=" & (CurPgNum +1) & "' class='Command' style='color:#000000;'>Trang kế tiếp<img src='hinh-thoi-trang\\ico_3arrows.gif' alt='Xem trang kế tiếp' height='16' align='absmiddle'></a></td>"
	if isNext = true then str = str  & "<td><a href='"& getPageDetail(CurPgNum +1) & "' class='Command' style='color:#000000;'>Trang kế tiếp<img src='"& seo_mode_img &"\ico_3arrows.gif' alt='Xem trang kế tiếp' height='16' align='absmiddle'></a></td>"	
	showNavigation = str & "</tr></table></td></tr></table></td></tr></table>"
end function

'SEO Functions
Function wordCount(WordStr)
	Dim arrWords
	arrWords=Split(Trim(WordStr))
	wordCount=uBound(arrWords)+1
End Function

Function leftWord (WordStr,WordNum) 'WordStr: aData(9,0)
	Dim arrWords, nWords, wCount	
	WordNum=WordNum-1 'Adjust for array which starts at 0
	arrWords=Split(Trim(WordStr))
	nWords=uBound(arrWords)
	If WordNum > nWords Then 'Case number of words want to get is greater total number of words available, then set it to the available
		WordNum=nWords
	End If
	For wCount=0 to WordNum
		leftWord = leftWord & (arrWords(wCount)) & " "
	Next
	leftWord=Trim(leftWord)	
End Function

Function phraseWordCount (density, repetition, wordCount)
	phraseWordCount= Round((wordCount * repetition)/density)
End Function
'/SEO Functions


If hasData Then
LayoutFormat=aData(9,0)
MainCatID=aData(8,0)
SubCatID=aData(6,0)
SubCatName=aData(5,0) & " "
SubCatName_hyphen=replace(Trim(SubCatName)," ","-")	
niqueKeywords=aData(7,0)

Brand=aData(10,0) & " "
Season=aData(11,0)  & " "
fYear=aData(12,0)  & " "
MainCatName=aData(13,0) & " "
MainCatName_hyphen=replace(MainCatName," ","-")  & " "
uTitle=aData(0,0)
kTitle=aData(1,0) & " "
uAuthor=aData(2,0)
uBody=aData(3,0)
kBody=Trim(aData(4,0))

'SEO handling **********************************************************

Dim seo_MetaKeywords, seo_MetaDescription, seo_H1, seo_H2, seo_Paragraph1

'Title SEO
seo_Title=kTitle & MainCatName & " " & SubCatName & fYear 
seo_Title=Ucase(left(seo_Title,1)) & right(seo_Title,len(seo_Title)-1)

'Meta Keuwords SEO
seo_MetaKeywords=kTitle & MainCatName & " " & SubCatName & Season & fYear 
seo_MetaKeywords=LeftWord(seo_MetaKeywords & niqueKeywords,26)

'Meta Description SEO
seo_MetaDescription=seo_Title & kBody
seo_MetaDescription=LeftWord(seo_MetaDescription,30)

'H1 SEO
seo_H1=seo_Title

'H2 SEO
seo_H2=MainCatName & " " & SubCatName & Season & fYear & kTitle
seo_H2=Ucase(left(seo_H2,1)) & right(seo_H2,len(seo_H2)-1)

'1st Paragraph
if kBody <> "" then 
	seo_Paragraph1=Ucase(left(kBody,1)) & right(kBody,len(kBody)-1)
else
	seo_Paragraph1 = ""
end if

'/SEO handling **********************************************************
End If
function getPageDetail(page)
	getPageDetail = leftmenu & getDetailFile (trim(MainCatName), trim(subcatname), aData(12,0), aData(1,0), ArticleID, page)
end function
'url = getDetailFile (maincatname, subcatname, fyear, ktitle, ArticleID, curPgNum)
'url = "detail.asp?aid=" & ArticleID & "&ckid=" & ckid 

If hasData Then

Dim metaindex
if (curPgNum > 1 or iv_RetLogin_Status = 0 ) and request.querystring("isgen") <> "1" then
'metaindex = "<meta name=""robots"" content=""noindex,nofollow"">"
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<Meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title><%= seo_Title %></title>
	<Meta name="keywords" content="<%= seo_MetaKeywords%>"> 
	<Meta name="description" content="<%=seo_MetaDescription%>">
	<%=metaindex%>
	<Meta http-equiv=" content-language" content ="vi">
	<meta http-equiv="Expires" content="0">
	<link rel="shortcut icon" href="<%= leftmenu%>favicon.ico" type="image/x-icon"> 
	<link rel="icon" href="<%= leftmenu%>favicon.ico" type="image/x-icon"> 
	<link rel="STYLESHEET" type="text/css" href="<%= leftmenu%>system/styles.css">
	<style type="text/css">
	BODY {background:url(hinh-thoi-trang/bg.gif) center #323232 repeat-y;}
	#bt2 {margin-left:0px;}
	</style>
	<script src="<%= leftmenu%>Ajax/ajaxshowdata_v4_seo.js" type="text/javascript"></script>		
	<script language="JavaScript" type="text/javascript">
	<!--
	function openWin(ImageID,ImangeName){
		var qrystring
		qrystring = "<%= leftmenu%>review.asp?iid="+ImageID+"&in="+ImangeName
		child=open(qrystring,"child","width=510,height=560");
		}
		// -->
	</script>
	<script language="JavaScript" type="text/javascript">
	function openManify(ImageID,ImangeName){
		var qrystring;
		qrystring = "zoom.asp?iid="+ImageID+"&in="+ImangeName;		
		child=open(qrystring,"child","width=510,height=560");		
		child.focus();
		}
		// -->
	</script>
		
	<script>		
		var strArt = "<%=listImage%>";
		<%if LoginStatus = true then%>
		var objPre = new PreLoad(strArt, "<%=getPrefixName (aData(12,0), aData(1,0)) & "-d" %>", <%=ArticleID%>, '<%=ckid%>', <%=LayoutFormat%>, <%=SubCatID%>);
		<%else%>
		var objPre = new PreLoad(strArt, "<%=getPrefixName (aData(12,0), aData(1,0)) & "-d" %>", <%=ArticleID%>, '', <%=LayoutFormat%>, <%=SubCatID%>);		
		<%end if%>
		function showfirst(){objPre.showfirst();}		
	</script>
	
</head>
<body>
<div id="bt2"><img src="hinh-thoi-trang/bg_top.gif" width="1049" height="20"></div>
<div id="container">
	<div id="btWrapper" style="bottom:-185px;">
		<div id="bt">
		<h1 align="left"><%=seo_H1%></h1>
		<h2 align="left"><%=seo_H2%></h2>
		<h4 align="left" style="height:120px;"><%= seo_Paragraph1 %>
		<br><br>		
		<%  
		If hasData4 Then
			For rCount4 = 0 to nRows4 %>
			<a href="<%=leftmenu & getDetailFile (trim(MainCatName), trim(subcatname), aData4(3,rCount4), aData4(2,rCount4), aData4(0,rCount4), 1)%>" title="<%=aData4(2,rCount4)%>"><%=Left(aData4(2,rCount4),80)%></a> &nbsp;&nbsp;
	<% 		Next
		End If	%>	
			
	<% 	If hasData5 Then 
			For rCount5 = 0 to nRows5 %>
			<a href="<%=leftmenu & getDetailFile (trim(MainCatName), trim(subcatname), aData5(3,rCount5), aData5(2,rCount5), aData5(0,rCount5), 1)%>"><%=Left(aData5(2,rCount5),80)%></a>&nbsp;&nbsp;
	<% 		Next 
		End If %>	
		</h4>		
		</div>
		<div id="bt2"><img src="hinh-thoi-trang/bg_bottom.gif" width="1049" height="20"></div>
	</div>	
	<div id="tp">
<table border="0" cellpadding="0" cellspacing="0" width="990" align="center">	
	<!--top-->
	<!--#include file="system/top.asp" -->
	
	<tr bgcolor="#6b5a60">
		<td width="160" style="height:1px;"><img src="<%=seo_mode_img%>/de_clear.gif" width="1" height="1" border="0"></td>
		<td width="522" valign="top" rowspan="2">		
		<!--body-->		
			<!--cover <%=seo_H1%>-->		
		<table border="0" cellpadding="0" cellspacing="1" width="100%" bgcolor="#B6A8AD">			
			<tr><td colspan="3" style="padding-left:12px; "><img src="<%=seo_mode_img%>/<%=SubCatName_hyphen%>-hp.gif" width="400" height="40"></td></tr>
			<% If  showmessage="1" Then %>
				<tr bgcolor="#E55A5D"><td colspan="3" style="padding:10px;"><h5 style="color:#FFFFFF"><strong>Trang này đả được lưu!</strong> Truy cập vào <a href="user_index.asp?t=t&ckid=<%= ckid %>" style="color:#FFFFFF">Tài khoản</a> để xem trang yêu thích của bạn.</h5></td></tr>		
			<% ElseIf  showmessage="2" Then %>
				<tr bgcolor="#E55A5D"><td colspan="3" style="padding:10px;"><h5 style="color:#FFFFFF"><strong>Hình đả được lưu!</strong> Truy cập vào <a href="user_index.asp?t=t&ckid=<%= ckid %>" style="color:#FFFFFF">Tài khoản</a> để xem album hình yêu thích của bạn.</h5></td></tr>		
				<% End If %>
			<tr>
				<!--col left-->		
				<td valign="top">
					<table cellpadding="0" cellspacing="0" border="0" bgcolor="#B6A8AD"  width="100%">		
					<tr>
						<td>	
							<% 	
				Dim c_ColPerRow, c_StartCel, c_EndCel, c_nFillCels, c_isRowEnd, c_DataTotal, c_Count, c_arrData
				Dim TDstyle, Image, ImgOrientation
				
				If hasData Then 					
					'Assign variables
					If LayoutFormat = 2 Then 'avatar layout
						c_ColPerRow = 5
					Else
						c_ColPerRow = 2
					End If
					c_DataTotal = nRows2
					c_Count = rCount2											
					'system-calculations----------------------------------------------
					If (c_DataTotal) Mod c_ColPerRow > 0 Then
						c_EndCel = (Int(((c_DataTotal)/c_ColPerRow))+1)*c_ColPerRow
					Else
						c_EndCel = c_DataTotal
					End If						
					'system-calculations----------------------------------------------			
								
					TDstyle = "align=""right"""

												
							c_Count = 0 
								If aData(1,0) <> "" Then
									Image = getNameImage (getPrefixName(aData(12,0), aData(1,0)) , ImgDet, ArticleID , MainImageNo)
								Else 
									Image="de_clear.gif"
								End If						

								strURL="iid=" & MainIID & "&in="&Image&"&o=v&aid="&ArticleID&"&ckid="&ckid
								
								If iswallpaper(SubCatID) = true Then	
									strAction="<a href='"&leftmenu&"download.asp?iid=" & MainIID & "&is=1024&in=" & Image & "&dt=4' class='DetailAction' >1024x768</a>|<a href='"&leftmenu&"download.asp?iid=" & MainIID & "&is=800&in=" & Image & "&dt=4' class='DetailAction'>800x600</a>|<a href='"&leftmenu&"emailfriend.asp?dt=4&" & strURL & "' class='DetailAction'>Gửi hình nền</a>"
								ElseIf isavatar(SubCatID) = true Then 'avatar
									sAvatarO="<a href='"&leftmenu&"download.asp?iid=" & MainIID & "&in=" & Image & "&dt=5' class='DetailAction' style='margin:2'>"
									sAvatarC="</a>"
									strAction="<a href='"&leftmenu&"download.asp?iid=" & MainIID & "&in=" & Image & "&dt=5' class='DetailAction' style='margin:2'>Tải avatar</a>"
								Else
									strAction="<img src='"& seo_mode_img &"/ico_ecard.gif' width='19' height='18' border='0' align='absmiddle'><a href='"&leftmenu&"ecard.asp?dt=3&" & strURL & "' class='DetailAction' style='margin:0 6 0 0'>Gửi thiệp số</a><img src='"& seo_mode_img &"/ico_album.gif' width='19' height='18' border='0' align='absmiddle'><a href='"&leftmenu&"user_favimg_add.asp?aid="&ArticleID&"&fid="&MainIID&"&dt=3&ckid="&ckid&"' class='DetailAction' style='margin:0px;'>Lưu album</a><img src='"& seo_mode_img &"/ico_album.gif' width='19' height='18' border='0' align='absmiddle'><a href=""#"" class=""DetailAction"" style=""margin:0px;"" onclick=""javascript:openWin("&MainIID&",'"&seo_model_img&"/"&Image&"')"">Đánh giá</a>"
								End If		
								
								If MainImageW <> "" Then
									ImageW=MainImageW
								Else
									ImageW="250"
								End If
								 %>			
						<div id="mainImage">						
						<%if cint(CurPgNum) = 1 then%>
						<table cellpadding="0" cellspacing="0" border="0" bgcolor="#B6A8AD"  width="100%">													 
						<tr>
							<td>
							<table cellpadding="0" cellspacing="0" border="0" bgcolor="#B6A8AD"  width="100%">								 		
							<tr bgcolor="#F7F6BD">						
								<td valign="top" colspan="2" style="padding:15px 12px 0px 13px">			
									<div id="ImageMain" style="padding:0px 15px 7px 0px">								
										<div style="width:<%= ImageW %>px;"><%=sAvatarO%><img style="cursor:pointer" src="<%= seo_model_img%>/<%=Image%>" onclick="javascript:openManify(<%=MainIID%>,'<%=seo_model_img%>/<%= Image%>')" alt="<%= aData(1,c_Count) %>" Title="<%= aData(1,c_Count)%>"><%=sAvatarC%></div>
										<div style="width:<%= ImageW %>px; text-align:left; background-color:#7C6787;"><%=strAction%></div>
										<div style="width:<%= ImageW %>px; background-color:#000000;"><img src="<%=seo_mode_img%>/de_clear.gif" alt="" width="1" height="1" border="0"></div>
										<div style="width:<%= ImageW %>px; font-size:10px; padding:4px 0px 0px 3px; width:<%= ImageW-3 %>px; text-align:left; <%=txtStyle%>; color:#000000; background-color:#7C6787;">Ảnh số: <%= MainIID %></div>
										<div style="width:<%= ImageW %>px;text-align:left; background-color:#7C6787;padding:0px 0px 3px 3px;width:<%= ImageW-3 %>px"><h5 style="line-height:130%;font-size:10px;color:#B6A8AD"><% If MainTitle <> "" Then response.Write(trim(MainTitle)) End If %></h5></div>
									</div>
									<h5 style="margin:2px 0px 0px 0px; display: block"><b class="dtTitle"><%=Trim(aData(0,c_Count))%></b><br><img src="<%=seo_mode_img%>/de_clear.gif" alt="" width="1" height="10" border="0"><br><%= aData(3,c_Count) %>
									<br><img src="<%=seo_mode_img%>/de_clear.gif" alt="" width="1" height="6" border="0"><br>
									<div style="color:#7C6787;font-size:10px" align="right"><%= aData(2,c_Count) %></div>
									<%	If MainCatID=5 or MainCatID=6 Then
									Else %>
									<div style="margin:8px 0px 10px 0px" class="link" style="text-decoration:none;">(Nếu những hình bên dưới không hiển thị. <a href="<%= leftmenu%>detail_full.asp?aid=<%= ArticleID%>&ckid=<%=ckid%>" rel="nofollow" class="link" style="text-decoration:underline;">Xin vui lòng click vào đây để xem.)</a></div>
									<% End If %>
									</h5>			
								</td>
							</tr>					
							<tr><td colspan="2" valign="middle" style="padding:7px 3px 5px 0px;" align="right"><div>
							<a target="_blank" href="<%=BM_Yahoo(seo_title, replace("http://thoitrang.com/"&leftmenu&getPageDetail(CurPgNum), "  ", " "))%>"  rel="nofolow" class="Command" style="margin:0px 0px 0px 3px;"><img src="<%=seo_mode_img%>/icon_Yahoo.gif" alt="Lưu thoitrang.com vào Yahoo Bookmark" width="16" height="16" border="0"> MyYahoo</a>
							<a target="_blank" href="<%=BM_Google(seo_title, replace("http://thoitrang.com/"&leftmenu&getPageDetail(CurPgNum), "  ", " "))%>"   rel="nofolow" class="Command" style="margin:0px 0px 0px 3px;"><img src="<%=seo_mode_img%>/icon_Google.gif" alt="Lưu thoitrang.com vào Google Bookmart" width="16" height="16" border="0"> Google</a>							
							<img src="<%=seo_mode_img%>/ico_save.gif" alt="Lưu trang này" width="16" height="16" align="absmiddle"><a href="<%= leftmenu%>user_fav_add.asp?a=add&dt=2&fid=<%= ArticleID %>&p=<%=CurPgNum%>&ckid=<%=ckid%>" class="Command" style="margin:0px 0px 0px 3px;">Lưu trang này</a><img src="<%=seo_mode_img%>/de_clear.gif" width="12" height="1"><img src="<%=seo_mode_img%>/ico_print.gif" alt="In trang này" width"16" height="16" align="absmiddle"><a href="<%= leftmenu%>detail_print.asp?aid=<%= ArticleID %>&ckid=<%=ckid%>" rel="nofollow" target="_blank" class="Command" style="margin:0px 0px 0px 4px;">In trang này</a><img src="<%=seo_mode_img%>/de_clear.gif" width="13" height="1"><img src="<%=seo_mode_img%>/ico_email.gif" alt="Gởi trang này" width="16" height="16" align="absmiddle"><a href="<%= leftmenu%>emailFriend.asp?dt=2&aid=<%= ArticleID %>&ckid=<%=ckid%>" class="Command" style="margin:0px 0px 0px 5px;">Gởi trang này</a><img src="<%=seo_mode_img%>/de_clear.gif" width="5" height="1"></div></td></tr>				
							<tr bgcolor="#000000"><td colspan="2"><img src="<%=seo_mode_img%>/de_clear.gif" alt="" width="1" height="1" border="0"></td></tr>
							<tr bgcolor="#B6A8AD"><td colspan="2"><img src="<%=seo_mode_img%>/de_clear.gif" alt="" width="1" height="7" border="0"></td></tr>
							</table>
							</td>
						</tr>
						</table>
						<%end if%>
						</div>						
						<div id="subImage1"></div>
						<div id="subImage2"></div>
						<%if TotalPages > 1 then%>					
						<table cellpadding="0" cellspacing="1" border="0" bgcolor="#B6A8AD"  width="99%" align="center">
							<tr><td ><img src="<%=seo_mode_img%>/de_clear.gif" width="1" height="7" border="0"></td></tr>				
							<tr bgcolor="#ffffff"><td ><img src="<%=seo_mode_img%>/de_clear.gif" width="1" height="1" border="0"></td></tr>									
							<tr bgcolor="#C0A79E"><td  valign="middle" align="right" height="20"><%=showNavigation()%></td></tr>						
							<tr bgcolor="#000000"><td ><img src="<%=seo_mode_img%>/de_clear.gif" width="1" height="1" border="0"></td></tr>
							<tr><td valign="middle" style="padding:5px 3px 0px 0px;" align="right"><div><img src="<%=seo_mode_img%>/ico_save.gif" alt="Lưu trang <%=seo_H1%> này" width="16" height="16" align="absmiddle"><a href="<%= leftmenu%>user_fav_add.asp?a=add&dt=2&fid=<%= ArticleID %>&d=detail.asp&qs=<%= server.URLEncode("aid="&ArticleID&"&p="&CurPgNum) %>&ckid=<%=ckid%>" class="Command" style="margin:0px 0px 0px 3px;">Lưu trang này</a><img src="<%=seo_mode_img%>/de_clear.gif" width="12" height="1"><img src="<%=seo_mode_img%>/ico_print.gif" alt="In trang <%=seo_H1%> này" width"16" height="16" align="absmiddle"><a href="<%= leftmenu%>detail_print.asp?aid=<%= ArticleID %>&ckid=<%=ckid%>" rel="nofollow" target="_blank" class="Command" style="margin:0px 0px 0px 4px;">In trang này</a><img src="<%=seo_mode_img%>/de_clear.gif" width="13" height="1"><img src="<%=seo_mode_img%>/ico_email.gif" alt="Gởi trang <%=seo_H1%> này" width="16" height="16" align="absmiddle"><a href="<%= leftmenu%>emailFriend.asp?dt=2&aid=<%= ArticleID %>&ckid=<%=ckid%>" class="Command" style="margin:0px 0px 0px 5px;">Gởi trang này</a></div></td></tr>								
						</table>				
						<%end if%>									
						</td>
					</tr>						
											
					<tr>
						<td>
							<table cellpadding="0" cellspacing="0" border="0" width="100%">							
							<tr bgcolor="#B6A8AD"><td colspan="2"><img src="<%=seo_mode_img%>/de_clear.gif" width="1" height="10" border="0"></td></tr>
							<% if hasData4 then %>
							<!--Newer Articles-->
							<tr bgcolor="#F7F6BD"><td class="NavL1" style="padding-left:13px;padding-top:10px;color:#6F5C79" colspan="2">Bài mới hơn</td></tr>
							<tr bgcolor="#F7F6BD">						
								<td valign="top" colspan="2">
									<table cellpadding="0" cellspacing="0" border="0">
									<tr><td><img src="<%=seo_mode_img%>/de_clear.gif" width="1" height="4"></td></tr>
								<%  For rCount4 = 0 to nRows4 %>
									<tr><td class="lsTitle" style="padding-left:15px;"><img src="<%=seo_mode_img%>/de_arrowr2.gif" width="13" height="16"></td>
									<td><h6><a href="<%=leftmenu & getDetailFile (trim(MainCatName), trim(subcatname), aData4(3,rCount4), aData4(2,rCount4), aData4(0,rCount4), 1)%>" title="<%=aData4(2,rCount4)%>" class="lsTitle"><%=Left(aData4(1,rCount4),80)%></a></h6></td></tr>										
									<% 	
									Next%>		
									</table>	
								</td>
							</tr>
							<% End If %>
							
							<% if hasData5 then %>
							<!--Older Articles-->
							<tr bgcolor="#F7F6BD"><td class="NavL1" style="padding-left:13px;padding-top:10px;color:#6F5C79" colspan="2">Bài cũ hơn</td></tr>
							<tr bgcolor="#F7F6BD">						
								<td valign="top" colspan="2">
									<table cellpadding="0" cellspacing="0" border="0">
									<tr><td><img src="<%=seo_mode_img%>/de_clear.gif" width="1" height="4"></td></tr>
									<% For rCount5 = 0 to nRows5 %>
									<tr><td class="lsTitle" style="padding-left:15px;"><img src="<%=seo_mode_img%>/de_arrowr2.gif" width="13" height="16"></td>
									<td><h6><a href="<%=leftmenu & getDetailFile (trim(MainCatName), trim(subcatname), aData5(3,rCount5), aData5(2,rCount5), aData5(0,rCount5), 1)%>" title="<%=aData5(2,rCount5)%>" class="lsTitle"><%=Left(aData5(1,rCount5),80)%></a></h6></td></tr>
									<% Next %>		
									<tr><td><img src="<%=seo_mode_img%>/de_clear.gif" width="1" height="10"></td></tr>
									</table>	
								</td>
							</tr>
							<% End If %>
							</table>
						</td>
					</tr>	
																				
					<%end if%>		
					</table>
				</td>
				<!--/col left-->							
			</tr>
		</table>
			<!--/text-->
		</td>
		<td width="308" style="width:0px;"><img src="<%=seo_mode_img%>/de_clear.gif" width="1" height="1" border="0"></td>
	</tr>
	
	<tr bgcolor="#ffffff">
		<td bgcolor="#000000" width="160" valign="top">
		<!--#include file="system/left.asp" -->
		</td>
		<!--1 TD of Rowspan-->		
		<td bgcolor="#614B00" width="308" valign="top">
			<table border="0" cellpadding="0" cellspacing="0" width="308" align="right">
				<tr bgcolor="#000000"><td colspan="2"><img src="<%=seo_mode_img%>/de_clear.gif" width="1" height="1" border="0"></td></tr>
				<form action="<%=leftmenu%>listing.asp?ckid=<%=ckid%>" method="post">
				<tr bgcolor="#8D0045">
					<td width="154" valign="top" height="33" ><input type="text" name="search" value="Tìm kiếm" size="22" class="txtSearch"></td>
					<td width="154" valign="top" style="padding-top:7px;padding-left:3px;"><input type="submit" name="go" value="TÌM" class="btnGo"></td>
				</tr>
				</form>
				<tr bgcolor="#000000"><td colspan="2"><img src="<%=seo_mode_img%>/de_clear.gif" width="1" height="1" border="0"></td></tr>
				<!--Ads-->
                <tr>
                    	<td colspan="2">
                         <!--Ads Starts-->
                        <table border="0" cellpadding="0" cellspacing="0" width="300" align="center">
                        <tr><td colspan="3"><img src="hinh-quang-cao/eseci_nu-trang.gif" alt="trang suc nu trang eseci"></td></tr>
                        <tr>
                            <td><a href="detail.asp?aid=1741&p=1"><img src="hinh-quang-cao/eseci-bong-tai-an-tuong.jpg" alt="bong tai an tuong"></a></td>
                            <td><a href="detail.asp?aid=1738&p=1"><img src="hinh-quang-cao/eseci-bong-tai-kim-loai.jpg" alt="bong tai kim loai"></a></td>
                            <td><a href="http://thoitrang.com/detail.asp?aid=1740&p=1"><img src="hinh-quang-cao/eseci-bong-tai-kim-cuong.jpg" alt="bong tai kim cuong"></a></td>
                        </tr>
                        <tr>
                            <td><a href="detail.asp?aid=1736&p=1"><img src="hinh-quang-cao/eseci-bong-tai-ngoc-trai.jpg" alt="bong tai ngoc trai"></a></td>
                            <td><a href="detail.asp?aid=1739&p=1"><img src="hinh-quang-cao/eseci-bong-tai-tinh-yeu.jpg" alt="bong tai tinh yeu"></a></td>
                            <td><a href="detail.asp?aid=1735&p=1"><img src="hinh-quang-cao/eseci-bong-tai-pha-le.jpg" alt="bong tai pha le"></a></td>
                        </tr>
                         <tr><td colspan="3"><img src="hinh-quang-cao/eseci-mua-hang.gif" alt="mua nu trang"></td></tr>
            <tr><td colspan="3"><a href="thanh-toan.asp?ckid=<%= ckid %>"><img src="hinh-quang-cao/eseci-tra-tien.gif" alt="tra tien mua nu trang"></a></td></tr>
            <tr><td colspan="3"><img src="hinh-quang-cao/eseci-mua-gia-si.gif" alt="mua ban si nu trang"></td></tr>
                        </table>
                        <!--Ads ends-->
                        </td>
                    </tr>	
			</table>
		</td>
	</tr>
	<!--/body-->
	<!--#include file="system/bottom.asp" -->	
</table>
</div>
</div>
<script>showfirst();</script>	
</body>
</html>
<% End If 
DisposeArticleNaming
%>